package tankgame02_move;

public class Tank {
    private int x;
    private int y;
    private int dirct; //0123 上左下右
    private int type;//0自己 1敌人
    private int speed=2;

    public  void  moveUp(){
        y-=speed;
    }
    public  void  moveRight(){
        x+=speed;
    }
    public  void  moveDown(){
        y+=speed;
    }
    public  void  moveLeft(){
        x-=speed;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getDirct() {
        return dirct;
    }

    public void setDirct(int dirct) {
        this.dirct = dirct;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Tank(int x, int y) {
        this.x = x;
        this.y = y;

    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
}
